﻿using Avalonia;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Styling;
using AvaloniaWeChatList.Controls;

namespace AvaloniaWeChatList.Views;

public partial class MainWindow : ChatWindow
{
    public MainWindow()
    {
        InitializeComponent();
    }

    private void Button_OnClick(object? sender, RoutedEventArgs e)
    {
        var toggleSwitch = (ToggleSwitch)sender!;

        if (toggleSwitch.IsChecked is null)
            return;

        Application.Current!.RequestedThemeVariant =
            toggleSwitch.IsChecked.Value ? ThemeVariant.Dark : ThemeVariant.Light;
    }

    private void SelectingItemsControl_OnSelectionChanged(object? sender, SelectionChangedEventArgs e)
    {
    }
}